package com.gitee.qdbp.general.common.api.settings.service;

import java.util.List;
import com.gitee.qdbp.able.exception.ServiceException;
import com.gitee.qdbp.base.system.model.IAccount;
import com.gitee.qdbp.general.common.api.settings.model.AreaBean;
import com.gitee.qdbp.general.common.api.settings.model.AreaChangedBean;
import com.gitee.qdbp.general.common.api.settings.model.AreaChangedDetails;
import com.gitee.qdbp.general.common.api.settings.model.AreaDivisionBean;

/**
 * 行政区划业务接口
 *
 * @author zhh
 * @version 170702
 */
public interface IAreaDivisionExecutor {

    void create(String scene, AreaBean model, IAccount me) throws ServiceException;

    void update(AreaDivisionBean model, IAccount me) throws ServiceException;

    void delete(String scene, String id, IAccount me) throws ServiceException;

    void delete(String scene, List<String> ids, IAccount me) throws ServiceException;

    /** 与互联网上的最新行政区划比对, 返回变动情况 **/
    List<AreaChangedDetails> compare(String scene, IAccount me) throws ServiceException;

    /** 保存变动情况 **/
    <T extends AreaChangedBean> void saveChanged(String scene, List<T> changed, IAccount me) throws ServiceException;

    /** 以互联网上的最新行政区划全量替换掉DB中的数据 **/
    void syncData(String scene, IAccount me) throws ServiceException;
}
